/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/
/*
IspImage is a Dyanmically-Allocated 2D array of Bytes, useful for representing
grayscale images. 

Example Usage:
--------------
	unsigned int Height, Width;
	int i,j;
	IspImage I = NULL;

	printf("input image Height and Width:");
	scanf("%u",&Height);
	scanf("%u",&Width);

	I = CreateImage( Height, Width );
	if ( I == NULL ) ReportErrorAndExit();

	for ( y = 0; y < Height; y++ )
		for ( x = 0; x < Width; x++ )
			I[y][x] = 100;
			
	DoSomethingWith( I ); 

	FreeImage( I );

This File was written for the course "Introduction
To Systems Programming" at Tel-Aviv University's School of Electrical 
Engineering, Winter 2011, by Amnon Drory.
*/
/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/

#ifndef __ISP_IMAGE_H
#define __ISP_IMAGE_H

/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/

#include "Dynamic2DCharArray.h"

/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/

typedef Dynamic2DCharArr IspImage;

/**
 * IspImage CreateImage( unsigned int Height, unsigned int Width ) 
 * allocates memory and created a new Image Array.
 *
 * Parameters:
 * ----------
 * Height - the height of the Image to create (number of rows).
 * Width - the width of the Image to create (number of columns).
 *
 * Returns:
 * -------
 * NULL - if memory allocation fails.
 * otherwise: an Image Array
 */ 
#define CreateImage CreateDynamic2DCharArr

/**
 * FreeImage( IspImage I ) releases all the memory that was allocated for
 * the image I.
 *
 * Parameters:
 * ----------
 * I - the Image Array whose memory should be released.
 */ 
#define FreeImage FreeDynamic2DCharArr

/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/

#endif // __ISP_IMAGE_H
